using System;
using System.Collections;
using System.Collections.Specialized;
using System.Data;
using System.Data.SqlTypes;
using System.Data.SqlClient;
using System.Text;
using ECommerce.DAL;


namespace Entity
{
	/// <summary>
	/// This object represents the Private Fields of TblProductPurchaseOrderItems_ForMultipleShipping.
	/// </summary>
	
	[System.ComponentModel.DataObject]
    public partial class TblProductPurchaseOrderItems_ForMultipleShipping : DatabaseUtility
    {
		#region TblProductPurchaseOrderItems_ForMultipleShipping Private Fields


		Int32 _productPurchaseOrderItems_ForMultipleShippingId;
		Int32 _productPurchaseOrder_MultipleShippingInfoId;
		Int32 _productId;
		Int32 _quantity;
		Decimal _price;
		
		#endregion
		#region TblProductPurchaseOrderItems_ForMultipleShipping Constractor
		/// <summary>
        /// Creates an empty object of TblProductPurchaseOrderItems_ForMultipleShipping. 
        /// This is mainly used to create a new instance of TblProductPurchaseOrderItems_ForMultipleShipping to add a new TblProductPurchaseOrderItems_ForMultipleShipping.
        /// </summary>
		public TblProductPurchaseOrderItems_ForMultipleShipping(){}
		
				
		/// <summary>
        /// Used to retrieve employee information from database, 
        /// which is also used by Update method to save information of an existing TblProductPurchaseOrderItems_ForMultipleShipping.
        /// </summary>
		public TblProductPurchaseOrderItems_ForMultipleShipping
		(
			Int32 productPurchaseOrderItems_ForMultipleShippingId,
			Int32 productPurchaseOrder_MultipleShippingInfoId,
			Int32 productId,
			Int32 quantity,
			Decimal price
		)
		{
			_productPurchaseOrderItems_ForMultipleShippingId = productPurchaseOrderItems_ForMultipleShippingId;	
			_productPurchaseOrder_MultipleShippingInfoId = productPurchaseOrder_MultipleShippingInfoId;	
			_productId = productId;	
			_quantity = quantity;	
			_price = price;	
		}
		
		#endregion
		#region TblProductPurchaseOrderItems_ForMultipleShipping Properties
		
		 /***********************************************************************************************
                                    -- PROPERTIES --        
         Contains all the properties representing the data fields of the current entity.
         ***********************************************************************************************/

        /// <summary>
        /// This is the Primary key value of the ProductPurchaseOrderItems_ForMultipleShippingId, which can't be assigned from the application,
        /// to ensure the data consistancy, by not letting the user to change the PK_TblProductPurchaseOrderItems_ForMultipleShipping to update the data of an another TblProductPurchaseOrderItems_ForMultipleShipping instance.
        /// For view or updation purpose, every TblProductPurchaseOrderItems_ForMultipleShipping will be retrieved thru the proper 'Get' method.
        /// </summary>
		
		public Int32 ProductPurchaseOrderItems_ForMultipleShippingId
		{
			get {return _productPurchaseOrderItems_ForMultipleShippingId;}	
		}
		
				
		public Int32 ProductPurchaseOrder_MultipleShippingInfoId
		{
			get {return _productPurchaseOrder_MultipleShippingInfoId;}
			set {_productPurchaseOrder_MultipleShippingInfoId = value;}
		}

		public Int32 ProductId
		{
			get {return _productId;}
			set {_productId = value;}
		}

		public Int32 Quantity
		{
			get {return _quantity;}
			set {_quantity = value;}
		}

		public Decimal Price
		{
			get {return _price;}
			set {_price = value;}
		}
		

		#endregion
		#region TblProductPurchaseOrderItems_ForMultipleShipping Static Methods
		/************************************************************************************
                                    -- CREATE METHOD (STATIC) --
        *************************************************************************************/
		/************************* Architecure note:**********************************
        Note 1:
        This method is specially useful for the case, where we need to use Object Data Source controls.
        For ObjectDataSource/SqlDataSource controls, the insert/update metnod requires paramters methods, rather property based methods.
        However, there is still a way to pass property based objects as method parameter for data source controls, 
        but in that case we could not use Sql type, as view controls or asp parameter control can only contain few of primitive type.
        The main reason to remain the Sql Type in our object architecture is it is faster and contains better way for null value support.
        
        Note 2: 
        Non-primary key: it should be primitive type, as the asp paramter control (included in data source control) supports only primitive types.
        /*****************************************************************************/
		[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public static  Int32 CreateNewTblProductPurchaseOrderItems_ForMultipleShipping
		(
			Int32 productPurchaseOrder_MultipleShippingInfoId,
			Int32 productId,
			Int32 quantity,
			Decimal price
		)
		{
			//creating an empty TblProductPurchaseOrderItems_ForMultipleShipping object
            TblProductPurchaseOrderItems_ForMultipleShipping tblProductPurchaseOrderItems_ForMultipleShipping = new TblProductPurchaseOrderItems_ForMultipleShipping();
				tblProductPurchaseOrderItems_ForMultipleShipping.ProductPurchaseOrder_MultipleShippingInfoId = productPurchaseOrder_MultipleShippingInfoId;
				tblProductPurchaseOrderItems_ForMultipleShipping.ProductId = productId;
				tblProductPurchaseOrderItems_ForMultipleShipping.Quantity = quantity;
				tblProductPurchaseOrderItems_ForMultipleShipping.Price = price;
			
			return TblProductPurchaseOrderItems_ForMultipleShipping.CreateNewTblProductPurchaseOrderItems_ForMultipleShipping(tblProductPurchaseOrderItems_ForMultipleShipping);
		}
	
		/************************************************************************************
                 -- UPDATE METHODS (STATIC) --
        *************************************************************************************/

        /************************* Architecure note:**********************************
        Note 1:
        This method is specially useful for the case, where we need to use Object Data Source controls.
        For ObjectDataSource/SqlDataSource controls, the insert/update metnod requires paramters methods, rather property based methods.
        However, there is still a way to pass property based objects as method parameter for data source controls, 
        but in that case we could not use Sql type, as view controls or asp parameter control can only contain few of primitive type.
        The main reason to remain the Sql Type in our object architecture is it is faster and contains better way for null value support.
        
        Note 2: 
        There the two types of paramaters will be passed here.
         * a. Primary key paramater: it should be Sql type, as we will bind the primary key property for the view controls (form view, details view etc) as datakey.
         * b. Non-primary key: it should be primitive type, as the asp paramter control (included in data source control) supports only primitive types.
        /*****************************************************************************/
		
		[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public static  bool UpdateTblProductPurchaseOrderItems_ForMultipleShipping
		(
			Int32 productPurchaseOrderItems_ForMultipleShippingId,
			Int32 productPurchaseOrder_MultipleShippingInfoId,
			Int32 productId,
			Int32 quantity,
			Decimal price
		)
		{
			 TblProductPurchaseOrderItems_ForMultipleShipping tblProductPurchaseOrderItems_ForMultipleShipping =  TblProductPurchaseOrderItems_ForMultipleShipping.GetTblProductPurchaseOrderItems_ForMultipleShippingByProductPurchaseOrderItems_ForMultipleShippingId(productPurchaseOrderItems_ForMultipleShippingId);
			
				tblProductPurchaseOrderItems_ForMultipleShipping.ProductPurchaseOrder_MultipleShippingInfoId = productPurchaseOrder_MultipleShippingInfoId;
				tblProductPurchaseOrderItems_ForMultipleShipping.ProductId = productId;
				tblProductPurchaseOrderItems_ForMultipleShipping.Quantity = quantity;
				tblProductPurchaseOrderItems_ForMultipleShipping.Price = price;
			
			return TblProductPurchaseOrderItems_ForMultipleShipping.UpdateTblProductPurchaseOrderItems_ForMultipleShipping(tblProductPurchaseOrderItems_ForMultipleShipping);
		}

		/************************************************************************************
                         -- DELETE METHODS --
        *************************************************************************************/
        /************************* Architecure note:**********************************
        We have used the employeeId parameter as SqlInt32, to bind the delete method with object data source and view control directly.
        ****************************************************************************/
		[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public static  bool DeleteTblProductPurchaseOrderItems_ForMultipleShipping
		(
			Int32 productPurchaseOrderItems_ForMultipleShippingId
		)
		{
			//Validate Input
			if(productPurchaseOrderItems_ForMultipleShippingId <= GetProductPurchaseOrderItems_ForMultipleShippingIdMinValue)
				throw (new ArgumentOutOfRangeException("productPurchaseOrderItems_ForMultipleShippingId"));
				
			// Execute SQL Command
            SqlCommand sqlCmd = new SqlCommand();
			AddParameterToSqlCmd(sqlCmd, "@ReturnValue", SqlDbType.Int, 0, ParameterDirection.ReturnValue, null);
			AddParameterToSqlCmd(sqlCmd, "@ProductPurchaseOrderItems_ForMultipleShippingId",SqlDbType.Int, 0, ParameterDirection.Input, productPurchaseOrderItems_ForMultipleShippingId);
			SetCommandType(sqlCmd,CommandType.StoredProcedure,SPR_TBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING_DELETETBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING);
			ExecuteScalarCmd(sqlCmd);
			int returnValue = (int)sqlCmd.Parameters["@ReturnValue"].Value;
			return (returnValue == 0 ? false : true);
			
		}
		
		/// <summary>
        /// Deletes a set of employees from the database.
        /// </summary>
		public static bool DeleteTblProductPurchaseOrderItems_ForMultipleShippingList( System.Collections.Generic.List<Int32>  productPurchaseOrderItems_ForMultipleShippingIdListToDelete)
		{
			//Validate Input
			foreach (Int32 productPurchaseOrderItems_ForMultipleShippingId in productPurchaseOrderItems_ForMultipleShippingIdListToDelete)
			    if(productPurchaseOrderItems_ForMultipleShippingId <= GetProductPurchaseOrderItems_ForMultipleShippingIdMinValue)
					throw (new ArgumentOutOfRangeException("productPurchaseOrderItems_ForMultipleShippingId"));
			
			//performing deletion operation //

            string xmlString = FormatXMLForIdArray(productPurchaseOrderItems_ForMultipleShippingIdListToDelete);
			
			// Execute SQL Command
            SqlCommand sqlCmd = new SqlCommand();
			AddParameterToSqlCmd(sqlCmd, "@ReturnValue", SqlDbType.Int, 0, ParameterDirection.ReturnValue, null);
            AddParameterToSqlCmd(sqlCmd, "@ProductPurchaseOrderItems_ForMultipleShippingIdList", SqlDbType.Xml, xmlString.ToString().Length, ParameterDirection.Input, xmlString.ToString());
			SetCommandType(sqlCmd,CommandType.StoredProcedure,SPR_TBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING_DELETETBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPINGLIST);
			ExecuteScalarCmd(sqlCmd);
			int returnValue = (int)sqlCmd.Parameters["@ReturnValue"].Value;
			return (returnValue == productPurchaseOrderItems_ForMultipleShippingIdListToDelete.Count ? true : false);
		}
		
		/************************************************************************************
                                 -- GET BY PRIMARY METHODS --
        *************************************************************************************/
        /************************* Architecure note:**********************************
        Retrives an Employee from database, based on it's primary key.
        To view or update an employee, everytime we must have to use this type of 'get' method, 
        since we don't have direct access to the Primary key value for assigning value.
        We have used the employeeId parameter as SqlInt32, to bind the delete method with object data source and view control directly.
        /*****************************************************************************/
		[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
		public static TblProductPurchaseOrderItems_ForMultipleShipping GetTblProductPurchaseOrderItems_ForMultipleShippingByProductPurchaseOrderItems_ForMultipleShippingId(Int32 productPurchaseOrderItems_ForMultipleShippingId)
		{
			if(productPurchaseOrderItems_ForMultipleShippingId <= GetProductPurchaseOrderItems_ForMultipleShippingIdMinValue)
					throw (new ArgumentOutOfRangeException("productPurchaseOrderItems_ForMultipleShippingId"));
				
		 	// Execute SQL Command
			SqlCommand sqlCmd = new SqlCommand();
			AddParameterToSqlCmd(sqlCmd, "@ProductPurchaseOrderItems_ForMultipleShippingId",SqlDbType.Int, 0, ParameterDirection.Input, productPurchaseOrderItems_ForMultipleShippingId);
			SetCommandType(sqlCmd,CommandType.StoredProcedure,SPR_TBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING_GETTBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPINGBYPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPINGID);
			GenerateCollectionFromReader test = new GenerateCollectionFromReader(GenerateTblProductPurchaseOrderItems_ForMultipleShippingCollectionFromReader);
            CustomCollection<TblProductPurchaseOrderItems_ForMultipleShipping> objCollection = ((CustomCollection<TblProductPurchaseOrderItems_ForMultipleShipping>)ExecuteReaderCmd(sqlCmd, test));

            if (objCollection.Count > 0)
                return objCollection[0];
            else
                return null;
		}
		
		/************************************************************************************
                         -- GET BY FOREIGN KEY METHODS --
        *************************************************************************************/
		
		/************************************************************************************
                 -- GET ALL METHODS --
        *************************************************************************************/
		[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public static CustomCollection<TblProductPurchaseOrderItems_ForMultipleShipping> GetAllTblProductPurchaseOrderItems_ForMultipleShipping()
		{
		
		 	// Execute SQL Command
            SqlCommand sqlCmd = new SqlCommand();
            SetCommandType(sqlCmd,CommandType.StoredProcedure,SPR_TBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING_GETALLTBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING);
            GenerateCollectionFromReader test = new GenerateCollectionFromReader(GenerateTblProductPurchaseOrderItems_ForMultipleShippingCollectionFromReader);
            CustomCollection<TblProductPurchaseOrderItems_ForMultipleShipping> objCollection = ((CustomCollection<TblProductPurchaseOrderItems_ForMultipleShipping>)ExecuteReaderCmd(sqlCmd, test));

            return objCollection;
		}
		
		[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public static CustomCollection<TblProductPurchaseOrderItems_ForMultipleShipping> GetAllTblProductPurchaseOrderItems_ForMultipleShippingPaged(String orderBy, Int32 startRowIndex, Int32 maximumRows)
        {
            //Validate Input
            if (orderBy == "")
                orderBy = "ProductPurchaseOrderItems_ForMultipleShippingId";

            // Execute SQL Command
            SqlCommand sqlCmd = new SqlCommand();
            AddParameterToSqlCmd(sqlCmd, "@orderby", SqlDbType.VarChar, 50, ParameterDirection.Input, orderBy);
            AddParameterToSqlCmd(sqlCmd, "@startrow", SqlDbType.Int, 0, ParameterDirection.Input, startRowIndex);
            AddParameterToSqlCmd(sqlCmd, "@pagesize", SqlDbType.Int, 0, ParameterDirection.Input, maximumRows);

            SetCommandType(sqlCmd,CommandType.StoredProcedure,SPR_TBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING_GETALLTBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPINGPAGED);

            GenerateCollectionFromReader test = new GenerateCollectionFromReader(GenerateTblProductPurchaseOrderItems_ForMultipleShippingCollectionFromReader);
            CustomCollection<TblProductPurchaseOrderItems_ForMultipleShipping> objCollection = ((CustomCollection<TblProductPurchaseOrderItems_ForMultipleShipping>)ExecuteReaderCmd(sqlCmd, test));
            return objCollection;
        }
		
		[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public static int GetAllTblProductPurchaseOrderItems_ForMultipleShippingPagedCount(String orderBy, Int32 startRowIndex, Int32 maximumRows)
        {
            // Execute SQL Command
            SqlCommand sqlCmd = new SqlCommand();

            AddParameterToSqlCmd(sqlCmd, "@ReturnValue", SqlDbType.Int, 0, ParameterDirection.ReturnValue, null);
            SetCommandType(sqlCmd,CommandType.StoredProcedure,SPR_TBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING_GETALLTBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPINGPAGEDCOUNT);
            ExecuteScalarCmd(sqlCmd);

            int returnValue = (int)sqlCmd.Parameters["@ReturnValue"].Value;
            return returnValue;
        }
		
		#endregion
		#region Employee Instance Methods
		/************************************************************************************
                                    -- SAVE (INSERT/UPDATE) METHODS (INSTANCE) --
        *************************************************************************************/
		/// <summary>
        /// Saves (inserts and updates) an Employee into database.
        /// The insertion occur if the EmployeeId conatins default value.
        /// Otherwises it updates the Employee into the database, based on the primary key value stored in EmployeeId.
        /// This technique ensures an Employee will not be updated without having a valid EmployeeId.
        /// </summary>
		public bool Save()
		{
			if(ProductPurchaseOrderItems_ForMultipleShippingId<= GetProductPurchaseOrderItems_ForMultipleShippingIdMinValue)
			{
				Int32 TempId=CreateNewTblProductPurchaseOrderItems_ForMultipleShipping(this);
				if(TempId>0)
				{
					_productPurchaseOrderItems_ForMultipleShippingId=TempId;
					return true;
				}
				else
				{
					// error occurs
					return false;
				}
			}
			else
			{	//This is a update Command
				return (UpdateTblProductPurchaseOrderItems_ForMultipleShipping(this));
			}
			
		}
		
		public static Int32 CreateNewTblProductPurchaseOrderItems_ForMultipleShipping(TblProductPurchaseOrderItems_ForMultipleShipping newTblProductPurchaseOrderItems_ForMultipleShipping)
		{
			// validate Parameters
			if (newTblProductPurchaseOrderItems_ForMultipleShipping == null)
				throw (new ArgumentNullException("newTblProductPurchaseOrderItems_ForMultipleShipping"));

			// Execute SQL Command
			SqlCommand sqlCmd = new SqlCommand();
			int length = 0;
			AddParameterToSqlCmd(sqlCmd, "@ReturnValue", SqlDbType.Int, 0, ParameterDirection.ReturnValue, null);
            
			AddParameterToSqlCmd(sqlCmd, "@ProductPurchaseOrder_MultipleShippingInfoId",SqlDbType.Int, 0, ParameterDirection.Input, newTblProductPurchaseOrderItems_ForMultipleShipping.ProductPurchaseOrder_MultipleShippingInfoId);
			AddParameterToSqlCmd(sqlCmd, "@ProductId",SqlDbType.Int, 0, ParameterDirection.Input, newTblProductPurchaseOrderItems_ForMultipleShipping.ProductId);
			AddParameterToSqlCmd(sqlCmd, "@Quantity",SqlDbType.Int, 0, ParameterDirection.Input, newTblProductPurchaseOrderItems_ForMultipleShipping.Quantity);
			AddParameterToSqlCmd(sqlCmd, "@Price",SqlDbType.Decimal, 9, ParameterDirection.Input, newTblProductPurchaseOrderItems_ForMultipleShipping.Price);
			
			SetCommandType(sqlCmd,CommandType.StoredProcedure,SPR_TBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING_CREATENEWTBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING);
			ExecuteScalarCmd(sqlCmd);
			return (Int32.Parse(sqlCmd.Parameters["@ReturnValue"].Value.ToString()));

		}
		/// <summary>
        /// Updates an TblProductPurchaseOrderItems_ForMultipleShipping instance to the database.
        /// </summary>
		public static bool UpdateTblProductPurchaseOrderItems_ForMultipleShipping(TblProductPurchaseOrderItems_ForMultipleShipping newTblProductPurchaseOrderItems_ForMultipleShipping)
		{
			// validate Parameters
			if (newTblProductPurchaseOrderItems_ForMultipleShipping == null)
				throw (new ArgumentNullException("newTblProductPurchaseOrderItems_ForMultipleShipping"));

			// Execute SQL Command
			SqlCommand sqlCmd = new SqlCommand();
			int length = 0;
			AddParameterToSqlCmd(sqlCmd, "@ReturnValue", SqlDbType.Int, 0, ParameterDirection.ReturnValue, null);
            
			AddParameterToSqlCmd(sqlCmd, "@ProductPurchaseOrderItems_ForMultipleShippingId",SqlDbType.Int, 0, ParameterDirection.Input, newTblProductPurchaseOrderItems_ForMultipleShipping.ProductPurchaseOrderItems_ForMultipleShippingId);
			AddParameterToSqlCmd(sqlCmd, "@ProductPurchaseOrder_MultipleShippingInfoId",SqlDbType.Int, 0, ParameterDirection.Input, newTblProductPurchaseOrderItems_ForMultipleShipping.ProductPurchaseOrder_MultipleShippingInfoId);
			AddParameterToSqlCmd(sqlCmd, "@ProductId",SqlDbType.Int, 0, ParameterDirection.Input, newTblProductPurchaseOrderItems_ForMultipleShipping.ProductId);
			AddParameterToSqlCmd(sqlCmd, "@Quantity",SqlDbType.Int, 0, ParameterDirection.Input, newTblProductPurchaseOrderItems_ForMultipleShipping.Quantity);
			AddParameterToSqlCmd(sqlCmd, "@Price",SqlDbType.Decimal, 9, ParameterDirection.Input, newTblProductPurchaseOrderItems_ForMultipleShipping.Price);
			
			SetCommandType(sqlCmd,CommandType.StoredProcedure,SPR_TBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING_UPDATETBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING);
            ExecuteScalarCmd(sqlCmd);
			int returnValue = (int)sqlCmd.Parameters["@ReturnValue"].Value;
			return (returnValue == 0 ? false : true);
		}
		#endregion
		
		#region TblProductPurchaseOrderItems_ForMultipleShipping Related Collections
		/// <summary>
        /// Creates and returns a strongly typed collection of Employee custom entity. 
        /// The colelction is created through iterating on the IdataReader object which contains Employee information, as a set of records, similar to tabular format.
        /// </summary>
		public static CollectionBase  GenerateTblProductPurchaseOrderItems_ForMultipleShippingCollectionFromReader(IDataReader returnData) 
		{
			
			//creating the instance of Employee collection
			CustomCollection<TblProductPurchaseOrderItems_ForMultipleShipping> colTblProductPurchaseOrderItems_ForMultipleShipping = new CustomCollection<TblProductPurchaseOrderItems_ForMultipleShipping>();
			
			/************************* Architecure note:**********************************
             * Below code includes the null value functionality to retieve the data which has nill value in database end.
             * Design consideration:
             * Besides general data fields, special care should be taken for primary keys, to assign '0'/defaultvalue, rather passing 'Null' value in constructor parameter.
             * Although we are considering sqldb tyoe data for the current data container, but while retireving data from database end, through datareader object, we need to cast data reader objects using .net primitive data type, 
             * rather using sqldb type to cast, since data reader objects don't support sql db type to be casted.
             *****************************************************************************/

            //Iterating thriugh the data reader, to generate Employee collection.

			//getting the Employee collection by iterating thru the data reader
			while (returnData.Read()) 
			{
				//passing the TblProductPurchaseOrderItems_ForMultipleShipping constructor parameters from the current instance of data reader fields.
				TblProductPurchaseOrderItems_ForMultipleShipping newTblProductPurchaseOrderItems_ForMultipleShipping = new TblProductPurchaseOrderItems_ForMultipleShipping
				(
					returnData["ProductPurchaseOrderItems_ForMultipleShippingId"]== System.DBNull.Value ? GetProductPurchaseOrderItems_ForMultipleShippingIdMinValue : (Int32 ) returnData["ProductPurchaseOrderItems_ForMultipleShippingId"],
					returnData["ProductPurchaseOrder_MultipleShippingInfoId"]== System.DBNull.Value ? 0: (Int32 ) returnData["ProductPurchaseOrder_MultipleShippingInfoId"],
					returnData["ProductId"]== System.DBNull.Value ? 0: (Int32 ) returnData["ProductId"],
					returnData["Quantity"]== System.DBNull.Value ? 0: (Int32 ) returnData["Quantity"],
					returnData["Price"]== System.DBNull.Value ? 0: (Decimal ) returnData["Price"]

				);
				//adding the Employee to the collection
				colTblProductPurchaseOrderItems_ForMultipleShipping.Add(newTblProductPurchaseOrderItems_ForMultipleShipping);
			}
			
			//returns the collection of Companys 
			return (colTblProductPurchaseOrderItems_ForMultipleShipping);
		}
		
		#endregion
		#region Constants and Default Values
		
		public static Int32 GetProductPurchaseOrderItems_ForMultipleShippingIdMinValue
		{
			get
			{
				return 0;
			}
		}
		
		//create method related contants
        internal const string SPR_TBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING_CREATENEWTBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING = "CreateNewTblProductPurchaseOrderItems_ForMultipleShipping";
        internal const string SPR_TBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING_UPDATETBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING = "UpdateTblProductPurchaseOrderItems_ForMultipleShipping";
        internal const string SPR_TBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING_DELETETBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING = "DeleteTblProductPurchaseOrderItems_ForMultipleShipping";
        internal const string SPR_TBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING_DELETETBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPINGLIST = "DeleteTblProductPurchaseOrderItems_ForMultipleShippingList";
        internal const string SPR_TBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING_GETTBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPINGBYPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPINGID = "GetTblProductPurchaseOrderItems_ForMultipleShippingByProductPurchaseOrderItems_ForMultipleShippingId";
        internal const string SPR_TBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING_GETALLTBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING = "GetAllTblProductPurchaseOrderItems_ForMultipleShipping";
        internal const string SPR_TBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING_GETALLTBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPINGPAGED = "GetAllTblProductPurchaseOrderItems_ForMultipleShippingPaged";
        internal const string SPR_TBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPING_GETALLTBLPRODUCTPURCHASEORDERITEMS_FORMULTIPLESHIPPINGPAGEDCOUNT = "GetAllTblProductPurchaseOrderItems_ForMultipleShippingPagedCount";
		
		#endregion
	}
}	
